package corej.course.collection.list.arraylist;

import java.util.*;

public class TestArrayListEmployee {

    @SuppressWarnings("unchecked")
    public static void main(String[] args) {

        List mylist = new ArrayList();

        mylist.add(new Employee("Army", 26, 8000));
        mylist.add(new Employee("Bomb", 21, 10000));
        mylist.add(new Employee("Army", 17, 8000));

        // ��mylist����
        Collections.sort(mylist);
        // ����mylist
        print(mylist);
    }

    public static void print(Collection c) {
        Iterator it = c.iterator();
        while (it.hasNext()) {
            Object o = it.next();
            System.out.println(o);
        }
    }

}
